import java.io.Serializable;
import java.util.HashSet;
import java.util.Observable;

public class MotsCles extends Observable implements Serializable {
	private String _motcle;	
	private HashSet<Ouvrage> _ouvrages;
	private HashSet<Article> _articles;
	
	public MotsCles(String mot){
		this.setMot(mot);
		this.setOuvrages(new HashSet<Ouvrage>());
		this.setArticles(new HashSet<Article>());
	}

	public String getMot() {
		return _motcle;
	}
	
	
	public HashSet<Ouvrage> getOuvrages(){
		return _ouvrages;
	}
	
	public void setOuvrages(HashSet<Ouvrage> ouvrages){
		_ouvrages=ouvrages;
	}
	
	public HashSet<Article> getArticles(){
		return _articles;
	}
	
	public void setArticles(HashSet<Article> articles){
		_articles=articles;
	}
	
	public void setArticle(Article art){
		this._articles.add(art);
	}
	
	public void setOuvrage(Ouvrage ouv){
		_ouvrages.add(ouv);
	}
	
	public void setMot(String mot){
		_motcle=mot;
	}
	
	public void ajouterOuvrage(Ouvrage ouv){
		this.setOuvrage(ouv);
	}
}